﻿using CPPEI.Coolzon.Event.NCL;
using CPPEI.Coolzon.Event.UI;
using CPPEI.Coolzon.UI.Event;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Coolvis.Console.Theme.MainViewControl
{
    public partial class OperationNavigation
    {
        [CPPEI.Coolzon.Common.Subscribe]
        public void OnCloseNav(CloseNavEvent @event)
        {
            RestoreNav();
            SetNavButBgImage(spInteraction);
        }
        [CPPEI.Coolzon.Common.Subscribe]
        public void OnCloseMagnifier(UIShowMagnifierEvent @event)
        {
            if (!@event.IsEnable)
            {
                magnifierImg.Style = (Style)dockPanel.Resources["magnifier"];
                NCLEventBus.Publish(new NCLShowMagnifierEvent(@event.IsEnable, null, 0, 0, 0, 0, 0.1));
                IsShowMagnifier = false;
            }
        }
        [CPPEI.Coolzon.Common.Subscribe]
        public void OnCloseLaserPen(UIShowLaserPointEvent @event)
        {
            if (!@event.IsEnable)
            {
                laserPenImg.Style = (Style)dockPanel.Resources["laserPen"];
                NCLEventBus.Publish(
                new NCLShowLaserPointerEvent(@event.IsEnable, null, 0, 0, 0, 0, 0.1));
                IsShowLaserPen = false;
            }
        }
    }
}
